home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 1914 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: solon.com!not-for-mail
  2. From: seebs@solutions.solon.com (Peter Seebach)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Newbie question:  Is this code OK?
  5. Date: 17 Jan 1996 13:35:22 -0600
  6. Organization: Usenet Fact Police (Undercover)
  7. Message-ID: <4djj1q$pnh@solutions.solon.com>
  8. References: <4di986$fk1@pegasus.interpac.net> <4dj7gp$e1o@beach.and.nl>
  9. NNTP-Posting-Host: solutions.solon.com
  10.  
  11. In article <4dj7gp$e1o@beach.and.nl>, Jos A. Horsmeier <jos@and.nl> wrote:
  12. >If we really carry things over the edge, we could've implemented the
  13. >if-then-else part as:
  14.  
  15. >    if (isspace(*string)^state) {
  16.  
  17. *ahem*.
  18.  
  19. >        num_words+= state;
  20. >        state= !state;
  21. >    }
  22.  
  23. There is an obvious problem with that line.
  24.  
  25. >but I wouldn't encourage such type of programming (leave that to idiots
  26. >who don't know any better, like me ;-)        
  27.  
  28. :)
  29.  
  30. (Overall, your analysis was quite good.  But be more careful.)
  31.  
  32. -s
  33. -- 
  34. Peter Seebach - seebs@solon.com - Copyright 1995 Peter Seebach.
  35. C/Unix proto-wizard -- C/Unix questions? Send mail for help.  No, really!
  36. Using trn?  Weird new newsgroup problem?  I know the fix!  Email me!
  37. The *other* C FAQ - ftp taniemarie.solon.com /pub/c/afq - Not A Flying Toy
  38.